package msgs;

/**
 * Represents a user's connection, whether admin or client. Mainly used by the server but needed to be in the msgs package for Java's sake...
 * Team 9: Andrew Hayworth, Brian Parrella, Ryan Kortmann, Nina Papa
 * @author Andrew Hayworth
 *
 */

public class ConnectedUser {
	private String ip, name, pwd;
	private byte[] clientKey;
	
	public ConnectedUser(ClientMsg cmsg) {
		ip = cmsg.getIP();
		name = cmsg.getName();
		pwd = cmsg.getPwd();
		clientKey = cmsg.getClientKey();
	}
	public ConnectedUser(AdminMsg amsg) {
		ip = amsg.getIP();
		name = amsg.getName();
		pwd = amsg.getPwd();
		clientKey = amsg.getAdminKey();
	}
	
	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getPwd() {
		return pwd;
	}

	public void setPwd(String pwd) {
		this.pwd = pwd;
	}

	public byte[] getClientKey() {
		return clientKey;
	}

	public void setClientKey(byte[] clientKey) {
		this.clientKey = clientKey;
	}
	
}
